package com.study.design.pattern.pattern.behavioral.chainofresponsibility;

/**
 * @Author: gongsl
 * @Date: 2025-03-25 23:46
 * @description: 具体处理者1：主管审批
 */
public class Supervisor extends LeaveHandler {
    @Override
    public void handleRequest(int leaveDays) {
        if (leaveDays <= 3) {
            System.out.println("主管批准 " + leaveDays + " 天请假");
        } else if (nextHandler != null) {
            nextHandler.handleRequest(leaveDays);
        }
    }
}
